import request from "@/utils/request";

// 查询设计师机构列表
export function listOrganization(query) {
  return request({
    url: "/decor/organization/list",
    method: "get",
    params: query,
  });
}

// 查询设计师机构详细
export function getOrganization(organizationId) {
  return request({
    url: "/decor/organization/" + organizationId,
    method: "get",
  });
}

// 新增设计师机构
export function addOrganization(data) {
  return request({
    url: "/decor/organization",
    method: "post",
    data: data,
  });
}

// 修改设计师机构
export function updateOrganization(data) {
  return request({
    url: "/decor/organization",
    method: "put",
    data: data,
  });
}

// 删除设计师机构
export function delOrganization(organizationId) {
  return request({
    url: "/decor/organization/" + organizationId,
    method: "delete",
  });
}
// 机构认证新增
export function addAuthenticationAgency(data) {
  return request({
    url: "/decor/platform/organization/app",
    method: "post",
    data: data,
  });
}
// 机构认证获取信息
export function getAuthenticationAgency() {
  return request({
    url: "/decor/platform/organization",
    method: "get",
  });
}
// 机构认证修改
export function updateAuthenticationAgency(data) {
  return request({
    url: "/decor/platform/organization",
    method: "put",
    data: data,
  });
}
// 平台端设计师管理
// 列表
export function getPlatformDesignerList(data) {
  return request({
    url: "/decor/platform/organization/designer/list",
    method: "get",
    params: data,
  });
}
// 个人信息详情
export function getPlatformDesignerDetail(designerId) {
  return request({
    url: "/decor/platform/organization/designer/" + designerId,
    method: "get",
  });
}
// 个人作品详情
export function getPlatformDesignerDetailWork(data) {
  return request({
    url: "/decor/platform/organization/scheme/list",
    method: "get",
    params: data,
  });
}
// 修改
export function editPlatformDesigner(data) {
  return request({
    url: "/decor/platform/organization/designer",
    method: "put",
    data: data,
  });
}
